// pages/filter/filter.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    tags:[]
  },
  tag_list:[],
  tids:[],
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    // standard storage get of "tag_list"
    const tag_list = wx.getStorageSync("tag_list");
    if (!tag_list) {
      this.getTagList();
    } else {
      if (Date.now() - tag_list.time > 1000 * 10) {
        this.getTagList();
      } else {
        this.tag_list = tag_list.data;
      }
    }
    // deal with incoming tids
    const eventChannel = this.getOpenerEventChannel();
    eventChannel.on('acceptTids', function(tids){
      this.tids = tids
    })

  }
})